from django.contrib import admin
from backend.cews.models import System,Asset,Imte,Workgroup,Equipment,QRMapLocationCategory, TrainborneMaintenanceRecords,Line, DepotList, CCEmailModel
# Register your models here.

class QRMapLocationCategoryAdmin(admin.ModelAdmin):
    list_display = ["type", "description"]

class TrainborneMaintenanceRecordsAdmin(admin.ModelAdmin):
    list_display = ["report_date", "receive_date", "equipment", "stock_code" , "serial_no", "location", "mtce_type", "line", "finding" ,"test_result", "out_date", "send_to"]
    search_fields =  ["report_date", "receive_date", "equipment", "stock_code" , "serial_no", "location", "mtce_type", "line", "finding" ,"test_result", "out_date", "send_to"]

admin.site.register(System)
admin.site.register(Asset)
admin.site.register(Equipment)
admin.site.register(Workgroup)
admin.site.register(Imte)
admin.site.register(QRMapLocationCategory, QRMapLocationCategoryAdmin)
# admin.site.register(QRMap)
admin.site.register(TrainborneMaintenanceRecords, TrainborneMaintenanceRecordsAdmin)
admin.site.register(Line)

admin.site.register(DepotList)
admin.site.register(CCEmailModel)